package me.luraframework.db.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.List;

/**
 * @ description: BaseJpaRepository
 * @ author: Liu Ran
 * @ data: 3/3/23 15:07
 */
@NoRepositoryBean
public interface BaseJpaRepository<T, ID> extends JpaRepository<T, ID>, JpaSpecificationExecutor<T> {

    List<T> findAll(Object criteria);

    List<T> findAll(Object criteria, Sort sort);

    Page<T> findAll(Object criteria, Pageable pageable);
}
